export default {
	namespaced: true,
	actions: {},
	mutations: {
		setUser(state, user) {
			state.id = user.id
			state.username = user.username
		},
		logout (state) {
			state.id = 0
			state.username = ''
		}
	},
	getters: {
		isLogin(state) {
			return state.id !== 0
		}
	},
	state: {
		id: 0,
		username: ''
	}
}
